
import React, {Component} from 'react';
import {View,Text,StyleSheet} from 'react-native';

// 自定义组件
class Student extends Component{
    render(){
        return (
            <View>
                <Text style={styles.stu}>{this.props.name}</Text>
                <Text style={styles.stu}>{this.props.age}岁</Text>
                <Text style={styles.stu}>电话：{this.props.tel}</Text>
            </View>
        )
    }
}


export default class App extends Component<{}> {
    render() {
        return (
            <View>
            <Student name="我是邹智" age='18' tel="16666666666" />
            <Student name="雨滴" age='20' tel="1888888888" />
            </View>
        );
    }
}

const styles = StyleSheet.create({

    stu:{
        fontSize:40
    }

})



